import { Injectable } from '@nestjs/common'
import { DiskHealthIndicator, HealthCheckService } from '@nestjs/terminus'

@Injectable()
export class HealthService {
    constructor(private health: HealthCheckService, private disk: DiskHealthIndicator) {}

    public async healthCheck() {
        return this.health.check([async () => this.disk.checkStorage('disk', { path: '/', thresholdPercent: 0.5 })])
    }
}
